/*
 * CConfig.cpp
 *
 *  Created on: 2011-11-18
 *      Author: Owner
 */

#include "Config.h"

CMyConfig2::CMyConfig2() {
	m_nCFFEXTime = 0;
	m_nSHFETime = 0;
	m_nDCETime = 0;
	m_nCZCETime = 0;
	m_nNextRequestID = 0;
	m_cBroker[0]='\0';
	m_cUser[0]= '\0';
	m_nMaxOrderRef = 1;
	m_cUsedServers[0]='\0';
	m_cDefaultPolicySO[0]='\0';
	m_nCancelOrderInterval=-1;
	strcpy(m_cUserProduct,"winner");
}

CMyConfig2::CMyConfig2(const char *pszConfigFile) {
	m_nCFFEXTime = 0;
	m_nSHFETime = 0;
	m_nDCETime = 0;
	m_nCZCETime = 0;
	m_nNextRequestID = 0;
	m_cBroker[0]='\0';
	m_cUser[0]= '\0';
	m_nMaxOrderRef = 1;
	m_cUsedServers[0]='\0';
	m_cDefaultPolicySO[0]='\0';
	LoadConfig(pszConfigFile);
	m_nCancelOrderInterval=-1;
	strcpy(m_cUserProduct,"winner");
}

CMyConfig2::~CMyConfig2(){
	map<string,list<string>* >::iterator it = m_TradeServers.begin();
	while(it != m_TradeServers.end()){
		delete it->second;
		it++;
	}
	m_TradeServers.clear();

	it = m_MDServers.begin();
	while(it != m_MDServers.end()){
		delete it->second;
		it++;
	}
	m_MDServers.clear();
}

